DXL Script exporting Views

Is there a way of selecting a specific view through a folder in a project which has 20 modules and exporting it to a csv file. Currently I have to go through each module select the view and export it to a csv file. Any help would be appreciated.

Regards
vppatel - Fri Feb 18 18:25:15 EST 2011

Re: DXL Script exporting Views
izzo - Mon Feb 21 05:43:46 EST 2011

This works:

Item item = (Item null)
Module m = null
for item in current Folder do
{
iType = type(item)
if (iType == "Formal")
{
m = edit(fullName(item), false)
setDefaultViewForModule (m, "your view name")
}
}

Re: DXL Script exporting Views
llandale - Mon Feb 21 11:50:41 EST 2011

izzo - Mon Feb 21 05:43:46 EST 2011
This works:

Item item = (Item null)
Module m = null
for item in current Folder do
{
iType = type(item)
if (iType == "Formal")
{
m = edit(fullName(item), false)
setDefaultViewForModule (m, "your view name")
}
}

// Personal note: I don't declare variables same as system functions, "item" in this case
      //    it gives me the HeeBeeJeeBees, makes the code more confusing, and sometimes
      //    it causes havok.
Item itm = (Item null)  // Yes very odd, "= null" won't work for "Items".
Module m = null
View   v = null
for itm in current Folder do 
{
   if (type(itm) == "Formal") 
   {
      m = read(fullName(itm), false, true) // invisible, load standard view
      v = view(itm, "MyExportView")
      load(m, v, false)                    // don't ask for view changes
// don't recall how to export a view... Someone else will fill that part in...
      close(m)
   }
}

 

  • Louie

 

Re: DXL Script exporting Views
vppatel - Mon Feb 21 14:41:13 EST 2011

Wanted to thank both of you for helping.

Thanks!!!!